package com.chenxin.interact.service.impl;

import java.util.List;

import com.chenxin.interact.domain.ToDeviceOrder;
import com.chenxin.interact.mapper.ToDeviceOrderMapper;
import com.chenxin.interact.service.IToDeviceOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 下发设备工单Service业务层处理
 * 
 * @author gry
 * @date 2025-07-22
 */
@Service
public class ToDeviceOrderServiceImpl implements IToDeviceOrderService
{
    @Autowired
    private ToDeviceOrderMapper toDeviceOrderMapper;

    /**
     * 查询下发设备工单
     * 
     * @param wmsToDeviceOrderId 下发设备工单主键
     * @return 下发设备工单
     */
    @Override
    public ToDeviceOrder selectToDeviceOrderByWmsToDeviceOrderId(Long wmsToDeviceOrderId)
    {
        return toDeviceOrderMapper.selectToDeviceOrderByWmsToDeviceOrderId(wmsToDeviceOrderId);
    }

    /**
     * 查询下发设备工单列表
     * 
     * @param toDeviceOrder 下发设备工单
     * @return 下发设备工单
     */
    @Override
    public List<ToDeviceOrder> selectToDeviceOrderList(ToDeviceOrder toDeviceOrder)
    {
        return toDeviceOrderMapper.selectToDeviceOrderList(toDeviceOrder);
    }

    /**
     * 新增下发设备工单
     * 
     * @param toDeviceOrder 下发设备工单
     * @return 结果
     */
    @Override
    public int insertToDeviceOrder(ToDeviceOrder toDeviceOrder)
    {
        return toDeviceOrderMapper.insertToDeviceOrder(toDeviceOrder);
    }

    /**
     * 修改下发设备工单
     * 
     * @param toDeviceOrder 下发设备工单
     * @return 结果
     */
    @Override
    public int updateToDeviceOrder(ToDeviceOrder toDeviceOrder)
    {
        return toDeviceOrderMapper.updateToDeviceOrder(toDeviceOrder);
    }

    /**
     * 批量删除下发设备工单
     * 
     * @param wmsToDeviceOrderIds 需要删除的下发设备工单主键
     * @return 结果
     */
    @Override
    public int deleteToDeviceOrderByWmsToDeviceOrderIds(Long[] wmsToDeviceOrderIds)
    {
        return toDeviceOrderMapper.deleteToDeviceOrderByWmsToDeviceOrderIds(wmsToDeviceOrderIds);
    }

    /**
     * 删除下发设备工单信息
     * 
     * @param wmsToDeviceOrderId 下发设备工单主键
     * @return 结果
     */
    @Override
    public int deleteToDeviceOrderByWmsToDeviceOrderId(Long wmsToDeviceOrderId)
    {
        return toDeviceOrderMapper.deleteToDeviceOrderByWmsToDeviceOrderId(wmsToDeviceOrderId);
    }
}
